<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head th:replace="top::html" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">

<body class="fixed hold-transition skin-blue">
    <div class="wrapper">
        <div th:replace="tophtml::html"></div>
        <div th:replace="left::html"></div>
        <div class="content-wrapper">
            <!-- Content Header (Page header) -->
            <section class="content-header">
                <h1>
                    <span>持有人管理</span>
                    <small></small>
                </h1>
                <ol class="breadcrumb">
                    <li><a th:href="@{/index}"><i class="fa fa-dashboard"></i>用户中心</a></li>
                    <li><a th:href="@{/project/showQuery}"><i class="fa fa-dashboard"></i>项目管理</a></li>
                    <li><a href="">持有人管理</a></li>
                </ol>
            </section>

            <section class="content container-fluid">
                <div class="box">
                    <div class="box-body">
                        <table class="table table-bordered">
                            <tbody>
                                <tr>
                                    <th>持有人id</th>
                                    <th>姓名</th>
                                    <th>操作</th>
                                </tr>
                                <tr th:if="${#lists.isEmpty(pageInfo.list)}">
                                	<td colspan="3" style="text-align: center;">
                                		<a th:href="@{'/project/showAddHolder?projectId='+${projectId}}">添加持有人</a>
                                	</td>
                                </tr>
                                <tr th:each="person : ${pageInfo.list}">
                                    <td>
                                    	<a th:if="${person.expertNumber}" th:href="@{'/person/personDetails?pid='+${person.pid}}" th:text="${'E'+person.expertNumber}"></a>
                                    </td>
                                    <td th:text="${person.name}">姓名</td>
                                    <td>
                                        <a th:if="${person.pid}" th:href="@{/project/showUpdateHolder(projectId=${projectId},personId=${person.pid})}">修改</a>
                                        <a th:unless="${person.pid}" th:href="@{/project/showAddHolder(projectId=${projectId},holderName=${person.name})}">修改</a>
                                        <a th:href="@{'/project/showAddHolder?projectId='+${projectId}}">添加</a>
                                        <a th:href="@{'/project/deleteHolder?projectId=' + ${projectId} + '&holderName=' + ${person.name} + '&personId='+${person.pid == null ? '' : person.pid}}">删除</a>
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                        <div th:replace="page::html"></div>
                    </div>
                </div>
            </section>
            <div id="back-center">
				<button type="button" class="btn btn-primary" onclick="window.history.go(-1)">返回</button>
			</div>
        </div>
        <div th:replace="footer::html"></div>
        <div class="control-sidebar-bg"></div>
    </div>
    <div th:replace="bottom::html" ></div>
</body>

</html>